home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_13_04 / allison / usecmplx.cpp < prev   
C/C++ Source or Header  |  1995-02-06  |  259b  |  17 lines

  1. LISTING 11 - Uses the complex number data type
  2.  
  3. #include <iostream.h>
  4. #include "complex.h"
  5.  
  6. main()
  7. {
  8.     complex c1(1,2), c2(3,4);
  9.  
  10.     cout << c1 << " + " << c2 << " == " << c1+c2 << endl;
  11.     return 0;
  12. }
  13.  
  14. // Output:
  15. (1,2) + (3,4) == (4,6)
  16.  
  17.